/**
 * Created with JetBrains PhpStorm.
 * User: ishowshao
 * Date: 12-8-21
 * Time: 下午9:09
 */
Ext.define('ExtFrame.controller.Menu', {
    extend: 'Ext.app.Controller',
    init: function () {
        this.control({
            'viewport > treepanel': {
                render: this.onMenuRender,
                itemclick: this.changePage
            }
        });
        console.log('菜单控制器初始化');
    },
    onMenuRender: function () {
        console.log('菜单render');
    },
    changePage: function (tree, record) {
        console.log('你点击了页面名字是\"' + record.get('name') + '\"的菜单，它的页面ID是' + record.get('id'));
        var lazy = this.getController('Lazy');
        console.log(lazy);
    }
});
